using System;

public class test
{
    public static void forceGC()
    {
        System.GC.Collect();
        System.GC.WaitForPendingFinalizers();
    }

    public static void testVec3()
    {
        Vec3 vec3 = new Vec3( 1.0f, 2.0f, 3.0f );

        Console.WriteLine( "\ntestVec3 ==========>" );

        Console.WriteLine( vec3.x().ToString() );
        Console.WriteLine( vec3.y().ToString() );
        Console.WriteLine( vec3.z().ToString() );

        Console.WriteLine( "\ntestVec3 <==========" );
    }

    public static void testObjectLifeCycle()
    {
        Console.WriteLine( "\ntestObjectLifeCycle ==========>" );

        BakeProcessor bp = new BakeProcessor();

        ILight lt = bp.createLight();

        Console.WriteLine( "unreferencing lt" );
        // unreference the created Light
        lt = null;
        forceGC();

        Console.WriteLine( "unreferencing bp" );
        // delete bp
        bp = null;
        forceGC();

        Console.WriteLine( "\ntestObjectLifeCycle ==========<" );
    }

    public static void Main()
    {
        try
        {
            Console.WriteLine( "\ncsharp test begin ==========>" );

            testVec3();

            testObjectLifeCycle();
        }
        catch ( Exception e )
        {
            Console.WriteLine( e.ToString() );
        }

        Console.WriteLine( "\ncsharp test end <==========" );

    }
}
